use crate::multi_tester;
use crate::utils::thread_pool::MultiThreadTester;

/// 堆栈专区

/// 格式化路径
pub fn reformat_path(path: String) -> String {
    let mut vec = Vec::new();
    path.split("/").for_each(|e| {
        match e {
            "." | "" => {}
            ".." => { vec.pop(); }
            _ => vec.push(e)
        }
    });
    format!("/{}", vec.join("/"))
}

#[test]
fn test_reformat_path() {
    multi_tester!({reformat_path("/asd/asd/../../sd".to_owned());});
}